Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fleet] Adjust add integration flow #101714

Merged

Conversation

jloleysens
Copy link
Contributor

@jloleysens jloleysens commented Jun 9, 2021

Summary

  • Link to integrations UI instead of add integration flow in fleet
  • Added route state for "current policy" that is forwarded to integrations, then sent back to fleet
  • After adding the integration in fleet, the user is sent to the agent policy details view instead of back to integration details

How to test

  1. Start Kibana + ES on basic
  2. Follow the in-app instructions for setting up a fleet server where agents can be registered
  3. Go to "fleet"
  4. View the available Indicate managed ILM policies in the UI #101438
  5. Go to a specific policy
  6. Click the "Add integration" button
  7. Select an integration package (you should be in the integrations UI)
  8. On clicking "Add {package name}" you should be directed to the fleet create package screen with first step "Configure" and second step select policy, with your policy name preconfigured
  9. Redirects:
  • Cancel: should take you back to the policy details view
  • Saving: should take you back to the policy details view with a toast asking you to add the policy to an agent

Screenshots

Screenshot 2021-06-10 at 18 07 53

Redesigned add to policy step:

Screenshot 2021-06-10 at 18 12 12

Just before choosing a package, we might consider this for a future update:

Screenshot 2021-06-09 at 14 18 24

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Risk Probability Severity Mitigation/Notes
Refactor of existing behaviour Med Med Careful CR, review with stakeholders and updating automated testing

- added link to the integrations UI instead of add integration
  in fleet
- added a new piece of route state that gets passed to integration
  from fleet when browsing integrations for a policy
- when the integration is being added the page will send the user
  back to the policy overview instead of back to integrations UI
@jloleysens jloleysens added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.14.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Jun 9, 2021
@jloleysens jloleysens requested a review from kpollich June 9, 2021 08:30
@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

merge conflict between base and head

…add-integrations-redirect

* 'master' of github.com:elastic/kibana: (44 commits)
  Allow navigating discover flyout via arrow keys (elastic#101772)
  [Cases] Improve connectors mapping (elastic#101145)
  [ML] Fixes display of job group badges in recognizer wizard (elastic#101775)
  Fix es_archives path (elastic#101737)
  [kbnArchiver] convert archive names to root-relative paths (elastic#101839)
  [Reporting] Make "ScreenCapturePanel" shareable for Canvas (elastic#100623)
  [Alerting UI] Converted Rules and Connectors management pages to new layout. (elastic#101697)
  [Fleet] Support granular integrations in policy editor (elastic#101531)
  [Security Solution][Detections] Update detection alert mappings to ECS v1.10.0 (elastic#101680)
  [Fleet] Integrations UI: Adjust policies list UI (elastic#101600)
  chore(NA): moving @kbn/server-route-repository into bazel (elastic#101484)
  Support owner and description attributes inside the Manifest file, use in API docs (elastic#101786)
  [Security Solution] fix security empty overview links (elastic#101536)
  Unskips migration tests now that elastic search is fixed (elastic#101682)
  Fix endpoint -> integrations onboarding link (elastic#101804)
  [Alerting] Log warning when rules are not rescheduled due to Saved Object not found error (elastic#101591)
  Update datafeed_high_count_network_denies.json (elastic#101681)
  [Index patterns] Field editor example app (elastic#100524)
  [DOCS] Adding file upload to add data page (elastic#101674)
  [Security Solution][Endpoint] Adds Endpoint Host Isolation Status common component (elastic#101782)
  ...

# Conflicts:
#	x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/index.tsx
#	x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/package_policies_table.tsx
@jloleysens jloleysens marked this pull request as ready for review June 10, 2021 16:03
@jloleysens jloleysens requested a review from a team as a code owner June 10, 2021 16:03
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

Copy link
Member

@kpollich kpollich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! No issues with code from me, and the intra-app state seems to work well. Awesome work 🚀

Copy link
Contributor

@jen-huang jen-huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a quick test locally with granular integrations and it works really nicely with that too! Left a small comment but otherwise LGTM 🚀

@@ -459,7 +451,8 @@ export const CreatePackagePolicyPage: React.FunctionComponent = () => {
)}
<StepsWithLessPadding steps={steps} />
<EuiSpacer size="l" />
<EuiBottomBar>
{/* Note: we set a relatively _low_ zIndex value here to account for EuiComboBox popover that might appear under the bottom bar */}
<EuiBottomBar style={{ zIndex: 50 }}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can we use styled instead of this inline style?

@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

@jloleysens jloleysens requested a review from a team as a code owner June 14, 2021 12:40
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
fleet 1006 1007 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 710.7KB 706.2KB -4.5KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet 434.8KB 435.5KB +688.0B
Unknown metric groups

API count

id before after diff
fleet 1096 1098 +2

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @jloleysens

Copy link
Member

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM

@jloleysens jloleysens merged commit f70542a into elastic:master Jun 15, 2021
@jloleysens jloleysens deleted the fleet/adjust-add-integrations-redirect branch June 15, 2021 07:26
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jun 15, 2021
* Initial commit, very WIP

- added link to the integrations UI instead of add integration
  in fleet
- added a new piece of route state that gets passed to integration
  from fleet when browsing integrations for a policy
- when the integration is being added the page will send the user
  back to the policy overview instead of back to integrations UI

* remove unnecessary agent policy clear function

* added # to path so that navigation is correctly handled

* added logic to read the forward agent policy id

* remove inline select integration package from fleet add integration

* updated toast notification

* using query parameter to pass policy id back to create policy package page

* removed policyId from route path

* fix type issue

* updated the select agent field layout per the designs

* simpified item rendering in combobox and fixed combobox z-index issue

* added comment

* fix types and i18n

* updated icon and removed unused i18n

* refactor to using styled components for cusomt z-index styling

* attempt to fix integration test

* added scroll functionality for dealing with fixed footers that might be obstructing content

* fix scroll direction!

* attempting another scroll algorithm

Co-authored-by: Kibana Machine <[email protected]>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Jun 15, 2021
* Initial commit, very WIP

- added link to the integrations UI instead of add integration
  in fleet
- added a new piece of route state that gets passed to integration
  from fleet when browsing integrations for a policy
- when the integration is being added the page will send the user
  back to the policy overview instead of back to integrations UI

* remove unnecessary agent policy clear function

* added # to path so that navigation is correctly handled

* added logic to read the forward agent policy id

* remove inline select integration package from fleet add integration

* updated toast notification

* using query parameter to pass policy id back to create policy package page

* removed policyId from route path

* fix type issue

* updated the select agent field layout per the designs

* simpified item rendering in combobox and fixed combobox z-index issue

* added comment

* fix types and i18n

* updated icon and removed unused i18n

* refactor to using styled components for cusomt z-index styling

* attempt to fix integration test

* added scroll functionality for dealing with fixed footers that might be obstructing content

* fix scroll direction!

* attempting another scroll algorithm

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Jean-Louis Leysens <[email protected]>
cuff-links pushed a commit to cuff-links/kibana that referenced this pull request Jun 15, 2021
* Initial commit, very WIP

- added link to the integrations UI instead of add integration
  in fleet
- added a new piece of route state that gets passed to integration
  from fleet when browsing integrations for a policy
- when the integration is being added the page will send the user
  back to the policy overview instead of back to integrations UI

* remove unnecessary agent policy clear function

* added # to path so that navigation is correctly handled

* added logic to read the forward agent policy id

* remove inline select integration package from fleet add integration

* updated toast notification

* using query parameter to pass policy id back to create policy package page

* removed policyId from route path

* fix type issue

* updated the select agent field layout per the designs

* simpified item rendering in combobox and fixed combobox z-index issue

* added comment

* fix types and i18n

* updated icon and removed unused i18n

* refactor to using styled components for cusomt z-index styling

* attempt to fix integration test

* added scroll functionality for dealing with fixed footers that might be obstructing content

* fix scroll direction!

* attempting another scroll algorithm

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants